package cn.com.hhrcw.statistics.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @author lixingxing
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Statistics implements Serializable {
    /**
     * 计划招聘数量
     */
    private Integer recruitment;

    /**
     * 待招聘数量
     */
    private Integer remaining;

    /**
     * 投递数量
     */
    private Integer total;

    /**
     * 系统过滤数量
     */
    private Integer filterBySystem;

    /**
     * 通过系统筛选
     */
    private Integer passFilterSystem;

    /**
     * 通过初筛数量
     */
    private Integer filterFirst;

    /**
     * 初筛淘汰数量
     */
    private Integer eliminateFilterFirst;

    /**
     * 面试邀请数量
     */
    private Integer interview;

    /**
     * 已面试数量
     */
    private Integer alreadyInterview;

    /**
     * 接收面试数量
     */
    private Integer acceptInterview;

    /**
     * 面试通过数量
     */
    private Integer passInterview;

    /**
     * 面试淘汰数量
     */
    private Integer eliminateInterview;

    /**
     * 发送offer数量
     */
    private Integer offer;

    /**
     * 接收offer数量
     */
    private Integer acceptOffer;

    /**
     * 拒绝offer数量
     */
    private Integer rejectOffer;

    /**
     * 入职数量
     */
    private Integer accession;

    /**
     * 待招聘数量
     *
     * @return
     */
    public Integer getRemaining() {
        return this.recruitment - this.accession;
    }

    /**
     * 面试淘汰你数量
     *
     * @return
     */
    public Integer getEliminateInterview() {
        return this.alreadyInterview - this.passInterview;
    }

    public Integer getEliminateFilterFirst() {
        return this.total - this.filterFirst;
    }

    public Integer getPassFilterSystem() {
        return this.total - this.filterBySystem;
    }

    public Statistics() {
        this.recruitment = 0;
        this.remaining = 0;
        this.total = 0;
        this.filterBySystem = 0;
        this.filterFirst = 0;
        this.interview = 0;
        this.alreadyInterview = 0;
        this.passInterview = 0;
        this.eliminateInterview = 0;
        this.offer = 0;
        this.acceptOffer = 0;
        this.rejectOffer = 0;
        this.accession = 0;
        this.eliminateFilterFirst = 0;
    }
}
